package com.example.design_pattern.responsibility_chain;

public class JiaMu extends Player {

    public JiaMu(){

    }

    public JiaMu(Player player){
        setmSuccessor(player);
    }

    @Override
    protected void handle(int index) {
        if(index == 0){
            System.out.println("贾母处理了........");
        }else{
            System.out.println("贾母传给下一个人........");
            next(index);
        }
    }
}
